
function arrow() {
    let canvas = document.getElementById("_canvas");
    let ctx = canvas.getContext("2d");
    let engine = new Engine(ctx);
    let layer = new Layer(ctx);

    layer.create = function () {
        let axis = new CoordinateObject();
        layer.addObject(axis);

        let polygon = new PolygonObject();
        polygon.radius = 80;
        polygon.x = 200;
        polygon.y = 200;
        polygon.degeCount = 3;
        polygon.addComponent(new GameComponent.AxisDottedLine());
        polygon.addComponent(new GameComponent.MouseDrag());
        polygon.addComponent(new GameComponent.Tip('三边形'));
        layer.addObject(polygon);


        let polygon1 = new PolygonObject();
        polygon1.radius = 100;
        polygon1.x = 400;
        polygon1.y = 200;
        polygon1.degeCount = 5;
        polygon1.addComponent(new GameComponent.AxisDottedLine());
        polygon1.addComponent(new GameComponent.MouseDrag());
        polygon1.addComponent(new GameComponent.Tip('五边形'));
        layer.addObject(polygon1);

        let polygon2 = new PolygonObject();
        polygon2.radius = 100;
        polygon2.x = 600;
        polygon2.y = 600;
        polygon2.degeCount = 7;
        polygon2.addComponent(new GameComponent.AxisDottedLine());
        polygon2.addComponent(new GameComponent.MouseDrag());
        polygon2.addComponent(new GameComponent.Tip('七边形'));
        layer.addObject(polygon2);

        polygon.addComponent(new GameComponent.Connect(polygon1));
        polygon1.addComponent(new GameComponent.Connect(polygon2));
        polygon2.addComponent(new GameComponent.Connect(polygon));
    }
    
    engine.addLayer(layer);
    engine.run();
    return engine;
}

